The present invention is related to the transmission data, and more particularly to a method and apparatus for transmitting data between communication devices.
Data communication schemes have been developed and used to transmit data between devices, such as electronic devices, according to the type of data being transmitted. In a synchronous communication system, transmission is accomplished by sending bit streams and character streams which are slaved to accurately synchronized clocks at the transmitting and receiving stations. Because a constant time interval is established between successive bits, characters, or events, beginning and end pulses are not required with each character. That is, synchronous transmission associated with a clock signal keeps the transmitter and receiver in phase. In contrast, in an asynchronous communication system, the transmission of data is independently controlled by beginning and end pulses in each frame of data. Although the data may be partitioned into frames of a predetermined number of bits and control bytes must be transmitted, the transmission of the bits or frames are not dependent upon a clock signal.
In order to transmit data in either mode, control signals or bytes are transmitted to provide the receiver with information to help decode the data. For example, control bytes representing the beginning of a frame (BOF) of data and an end of frame (EOF) of data are transmitted to provide an indication to the receiver that the data frame has been sent when sending asynchronous data. Particularly, the control bytes are particular bit arrangements which would be recognized by the receiver as having a particular meaning, such as that the data is being started or ended.
However, a problem occurs when the control signals are present in the data to be transmitted. That is, a receiver may decode the bits of data as being a control signal, and incorrectly receive the remaining data of the frame. In order to avoid sending data which could be interpreted as a control signal, the data could be assigned bit patterns such that the data could not include the bit patterns of the control signals. For example, when transmitting ASCII bit patterns representing alphanumeric characters, the ASCII bit patterns could be chosen to insure that they do not correspond to control signal bit patterns. However, such systems for transmitting asynchronous data are limited to the transmission of predefined bit patterns representing certain characters, such as letters.
According to another scheme for transmitting asynchronous data, the data is modified prior to transmitting to insure that the data does not include a control signal. For example, if the control signal represents six xe2x80x9conexe2x80x9d bits in row, the transmitter will insert a xe2x80x9czeroxe2x80x9d bit whenever a five xe2x80x9conexe2x80x9d bits are detected in the data. Accordingly, when the receiver detects five data bits, the receiver will remove the following xe2x80x9czeroxe2x80x9d and decode the next bit as either a xe2x80x9conexe2x80x9d or xe2x80x9czeroxe2x80x9d. If the following bit is a xe2x80x9conexe2x80x9d bit, representing six xe2x80x9conexe2x80x9d bits of data, the receiver will not detect the six xe2x80x9conexe2x80x9d bits as a control byte, but as data. In contrast, when the receiver detects six xe2x80x9conexe2x80x9d bits in a row (without removing a xe2x80x9czeroxe2x80x9d bit), the receiver will detect the control signal. Such a scheme for transmitting data is described in the advanced data communication control procedures (ADCCP), published by the American Nationals Standards Institute, Inc., on Jan. 9, 1979. However, such bit xe2x80x9cstuffingxe2x80x9d require the transmission of additional data, which lowers the speed and efficiency of the data transmission system.
Finally, according to another scheme for transmitting asynchronous data, a control byte, called an escape (xe2x80x9cESCxe2x80x9d) byte is transmitted prior to sending a byte of data which corresponds to a control byte. In addition to sending the control bit, the data byte itself could be altered, such by an xe2x80x9cexclusive orxe2x80x9d Boolean operation. Upon receiving an escape byte, the receiver would know that the following byte is not a control signal and should be decoded. However, such methods require the transmission of an escape byte for each byte which corresponds to a control byte, and also lowers the speed and efficiency of the data transmission system. Such a system also creates inconsistency in data efficiency. For example, if one frame coincidentially had a number of data bytes which coincided with control bits, the system would be particularly inefficient for that frame because it would have to send an escape byte for each such data byte
Accordingly, there is a need for an improved method and apparatus for transmitting data.